A file system in a computing environment is a collection of files and directories. A file system permits operations such read, write, listing attributes, etc. on the files and directories via a set of well defined interfaces. For example, a file system knows how to arrange a collection of files on a hard disk or a memory and applies file operations such as reading a file, listing the name of the files in a directory, and so on. One way of extending file system operations is using a stacked file system. The stacked file system provides mechanisms for enriching system functionality by using an extensible file system interface that allows new features to be added incrementally. A prior art published patent application by Hewlett-Packard Company entitled “Stacked File Systems and Methods”, publication number 20060117298 dated Jun. 1, 2006, describes such a stacked file system and method.
An example of a stacked file system includes virus scanning module, encrypting module and logging file access module. These modules are stacked one on top of another to form a layered or stacked file system. However, every module in the stacked file system adversely affects the file system performance. It is known that there may be as much as 5% performance impact for every module exists in the stacked file system. For example, a file system in use by a file server needs to enable virus scanning only if intrusion detection system (IDS) finds a malicious network packet being processed instead of running the virus scan each time the file is accessed. Likewise, accesses by trusted or secure users or clients within or outside a LAN may not require any further protection inside the file system.